/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __ADC_H
#define __ADC_H

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* Exported types ------------------------------------------------------------*/

typedef struct {
	uint32_t RCC_AHBPeriph_GPIO;
	GPIO_TypeDef*  GPIO_Port;
	uint32_t GPIO_Pin;
	uint32_t RCC_AHBPeriph_ADC;
	ADC_TypeDef *  ADCx;
	uint8_t ADC_Channel;
	uint8_t ADC_Rank;
} adc_struct;

typedef enum {
	ADC_YEL_L_V = 0,
	ADC_YEL_L_H,
	ADC_YEL_R_V,
	ADC_YEL_R_H,
	ADC_RED_L_V,
	ADC_RED_L_H,
	ADC_RED_R_V,
	ADC_RED_R_H,
	ADC_GRN_L_V,
	ADC_GRN_R_V,
	ADC_GRN_R_H,
	ADC_SPEED,
	ADC_SPARE,
	NO_OF_ADC_CH
} ADC_channel_enum;

/* Exported constants --------------------------------------------------------*/
//#define ADC_CHANNELS            4

/* Exported functions ------------------------------------------------------- */
void ADC_Config(void);
void ADC12_Handler(void);
void ADC3_Handler(void);
void ADC4_Handler(void);
#endif /* __ADC_H */
